#pragma once
#include "Bindable.h"

class IndexBuffer : public Bindable
{
public:
	IndexBuffer(Graphics& gfx, const std::vector<uint32_t>& indices);
	IndexBuffer(Graphics& gfx, std::string tag, const std::vector<uint32_t>& indices);
	void Bind(Graphics& gfx)  override;
	UINT GetCount() const noexcept;
	static std::shared_ptr<IndexBuffer> Create(Graphics& gfx, const std::string& tag,
		const std::vector<uint32_t>& indices);
protected:
	std::string tag;
	UINT count;
	Microsoft::WRL::ComPtr<ID3D11Buffer> pIndexBuffer;
};
